<template>
  <div>
    <!-- 修改设备弹出框 -->
    <div class="alert">
      <el-dialog
        title="货道设置"
        :visible="visible"
        width="65%"
        top="2vh"
        @close="closeFn"
        @open="openFn"
      >

        <!-- 导航栏 -->
        <!-- 图片内容 -->
        <el-carousel indicator-position="none" :autoplay="false">
          <el-carousel-item v-for="item in 4" :key="item">
            <h3>12eknvndcjdvd kmdv</h3>
          </el-carousel-item>
        </el-carousel>
        <!-- 底部按钮 -->
        <span slot="footer" class="dialog-footer">
          <el-button
            type="primary"
            class="btn1"
            @click="submitWork(departForm)"
          >确 认</el-button>
        </span>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import { } from '@/api'
export default {
  props: {
    visible: {
      type: Boolean,
      default: false
    }

  },
  data() {
    return {
      mobel: [],
      departForm: { vmType: '' },
      // 表单校验
      departRules: {
        vmType: [
          { required: true, message: '请选择型号', trigger: ['blur'] }
        ]
      }
    }
  },
  methods: {
    // 弹窗打开
    // 引入接口
    // 在弹窗打开时调用
    async openFn() {
    },

    //
    submitWork() {
      this.$emit('submit', this.departForm.vmType)
    },

    // 点击关闭
    closeFn() {
      this.$emit('close')
    }
  }

}
</script>

<style >
.el-carousel__item h3 {
    color: #475669;
    font-size: 18px;
    opacity: 0.75;
    line-height: 300px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }

  /* 底部按钮 */
  .alert .el-dialog__footer {
    padding: 10px 400px 20px;
  }
  .alert .el-dialog__body {
    padding: 10px 50px;
  }
</style>
